package com.dissertation.respository;

import com.dissertation.model.ApplyAllow;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.Date;
import java.util.List;
import java.util.Optional;

public interface ApplyAllowRepository extends MongoRepository<ApplyAllow, String> {

    List<ApplyAllow> findByApplyNameAndAssetIdAndStatusIsTrue(String applyName, String assetId);

    Optional<ApplyAllow> findByOwnerAndStatusIsFalse(String owner);

    List<ApplyAllow> findByOwner(String owner);

    List<ApplyAllow> findByApplyName(String applyName);

    ApplyAllow findByAssetIdAndApplyNameAndDealIsFalse(String assetId,String applyName);

    List<ApplyAllow> findByIdIn(String[] ids);



}
